 /*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 * 
 * Lớp này dùng để quản lý Màn Hình Của Trò Chơi
 * Trong đây sẽ có rất nhiều lớp màn hình đặt chồng lên cũng như nhiều control
 */
package TheBoard;

import TheBoard.*;

import java.util.*;

import javax.swing.JFrame;
import javax.swing.JComponent;
import java.awt.Container;
import java.awt.Component;
import java.awt.event.ComponentAdapter;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.LayoutManager;
import java.awt.image.*;
import java.awt.Rectangle;
import java.awt.Toolkit;

/**
 *
 * @author Windows7
 */
public class MenuFrame extends JFrame {
    /*
     * 
     *somthing here
     * 
     */
    //private BackGround bground;
    //private BackGround board;
    private multipleLayer bground;
    
    public MenuFrame()
    {
        super("Chess For Fun");
        init();
    }
    
    
    private void init()
    {
        this.setSize(600, 438);  
        int WIDTH = this.getWidth();  
        int HEIGHT = this.getHeight(); 
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();  
        this.setBounds((screenSize.width / 2) - (WIDTH / 2), (screenSize.height / 2) - (HEIGHT / 2), WIDTH, HEIGHT); 
        this.setLayout(new BorderLayout());
        bground = new multipleLayer("ChessForImages/Middle Ages Theme/backGround.png","ChessForImages/Middle Ages Theme/mainBoard.png","ChessForImages/Middle Ages Theme/rightPanel.png","ChessForImages/Middle Ages Theme/backImage.png","ChessForImages/Middle Ages Theme/scroll.png");
        this.setContentPane(bground);
        this.setResizable(false);
        this.pack();
        

        /*
         * some stuff here;
         */
        
        this.addWindowListener(new WindowAdapter() {
                @Override
                public void windowClosing(WindowEvent e)
                {            
                    System.exit(0);
                }
        });
    }


}
